\chapter{User Interface}
\label{user_interface}
The graphical user interface (GUI) allows the user to control the process. It consists of the main frame which allows to start and stop the program. An output text area allows to see current state changes in the state machine and holds all informations about the running steps, like current set reference values or the detected ball size.\\
Besides the main control, control parameter adjustments can be done just-in-time using secondary tabs.\\
During all times two real-time plotting devises are attached to the control frame. Depending on the current state of the process the upper plotter shows the current ball position, the set ball reference and the calculated ball output. The downer plotter shows the current beam angle, the set beam angle reference and the motor output.\\
The GUI is implemented using Java/SWING components.


\begin{figure}[htb]
\begin{center}
\ifpdf
	\includegraphics[scale=0.60]{img/Opcom.JPG}
\else
%	\includegraphics[scale=0.60]{img/Opcom.JPG}
\fi
\caption{The planed graphical user interface}
\label{fig:gui}
\end{center}
\end{figure}

\section{Changeable parameters}
All process and controller parameters are monitored and can be adjusted just-in-time. This implementation differs from the former planned implementation where the user would only be able to modify the parameters while the state machine would be in an idle mode.\\
This change seems to reasonable since parameter tuning can be done and the effect can be seen directly while the controllers are running. On the backside, the user must be careful to prevent unstable controller behavior or unforeseen consequences due to his parameter changes.\\ 

\section{Plotters}
The plotting devises are own running threads and get all output information by the SM class (statemachine).
